package com.hk.commons.entity.order;

import com.hk.commons.enm.OrderMonitorEvent;
import com.hk.commons.entity.IdEntity;

import javax.persistence.*;
import java.util.Date;

/**
 * Created by Antinomy on 17/2/20.
 */
@Entity
@Table(name = "t_order_monitor")
public class OrderMonitor extends IdEntity{

    @Column(columnDefinition = "bigint(20) NOT NULL comment '订单id'")
    private Long orderId;

    @Column(columnDefinition = "bigint(20) NOT NULL comment '产品id'")
    private Long productId;

    @Column(columnDefinition = "bigint(20) NOT NULL comment '客户id'")
    private Long userId;

    @Column(columnDefinition = "varchar(30) NOT NULL comment '事件类型'")
    @Enumerated(EnumType.STRING)
    private OrderMonitorEvent event = OrderMonitorEvent.STARTED;

    @Column(columnDefinition = "varchar(300) comment '事件结果'")
    private String result;

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public OrderMonitorEvent getEvent() {
        return event;
    }

    public void setEvent(OrderMonitorEvent event) {
        this.event = event;
    }

    public String getResult() {
        return result;
    }

    public void setResult(String result) {
        this.result = result;
    }
}
